cat $1 | sed 's/^\s*$/\n/' | sed 's/}\s*$/}\n/' | sed -e '/./b' -e :n -e 'N;s/\n$//;tn'
